home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / pvm34b3.zip / pvm34b3 / pvm3 / libfpvm / pvmfarchcode.m4 < prev    next >
Text File  |  1997-07-22  |  458b  |  26 lines

  1.  
  2. /* $Id: pvmfarchcode.m4,v 1.2 1996/10/04 15:26:54 pvmsrc Exp $ */
  3.  
  4. #include "pvm3.h"
  5. #include "pvm_consts.h"
  6.  
  7. void
  8. FUNCTION(pvmfarchcode) ARGS(`STRING_ARG(arch), code')
  9. STRING_ARG_DECL(arch);
  10. int *code;
  11. {
  12.     char tarch[MAX_HOST_NAME + 1];
  13.  
  14.     /*
  15.      * Copy the arch name to make sure there's
  16.      * a NUL at the end.
  17.      */
  18.     if (ftocstr(tarch, sizeof(tarch), STRING_PTR(arch), STRING_LEN(arch))) {
  19.         *code = PvmBadParam;
  20.         return;
  21.     }
  22.  
  23.     *code = pvm_archcode(tarch);
  24. }
  25.  
  26.